package com.button.systemtwo.controller;

import com.button.domain.ResultData;
import com.button.domain.request.SystemTwoRequest;
import com.button.domain.response.SystemTwoResponse;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统2测试接口
 * @author ZhangHang
 * @Description 系统2测试接口
 * @create 2022/7/14
 */
@RestController
public class SystemTwoController {

    /**
     * 系统2保存信息
     * @Description: 系统2保存信息
     * @author ZhangHang
     * @param systemTwoRequest 系统2保存信息请求实体
     * @return com.button.domain.ResultData<com.button.domain.response.SystemTwoResponse>
     * @date 2022/7/14 14:22
     */
    @PostMapping(value = "saveSysOneInfo")
    public ResultData<SystemTwoResponse> saveSysOneInfo(@RequestBody SystemTwoRequest systemTwoRequest){
        SystemTwoResponse systemTwoResponse = SystemTwoResponse.builder().age(systemTwoRequest.getAge()).gender("男").build();
        return ResultData.ok(systemTwoResponse);
    }
}
